package com.fnzx.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fnzx.entity.CooperativeUserEntity;
import com.fnzx.entity.dto.CoopPersonalRelationDto;
import com.fnzx.entity.vo.CooperativeWithPersonalVo;
import com.fnzx.util.PageUtils;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2021-10-23 22:20:00
 */
public interface CooperativeUserService extends IService<CooperativeUserEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 查找某个合作伙伴下属的个人用户
     * @param id 合作伙伴id
     * @return CooperativeWithPersonalVo
     */
    CooperativeWithPersonalVo listWithPersonal(Long id);

    /**
     * 注册一个个人顾问，并且让他属于某个合作伙伴
     * @param relationDto {@link CoopPersonalRelationDto}
     */
    void addPersonInCooper(CoopPersonalRelationDto relationDto);

    /**
     *获取全部的合作伙伴以及下属的个人顾问
     * 分页
     */
    List<CooperativeWithPersonalVo> listAllWithPersonalUser(Map<String, Object> params);

    /**
     * 添加一个已经存在的个人用户进合作伙伴
     * @param cooperId 合作伙伴id
     * @param personId 个人顾问id
     */
    void addExistPersonInCooper(Long cooperId,Long personId);
}

